﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace Entity
{
    public class Adverties
    {
        public string id { get; set; }
        public string name { get; set; }
        public string image { get; set; }
        public string width { get; set; }
        public string height { get; set; }
        public string link { get; set; }
        public string target { get; set; }
        public string content { get; set; }
        public string position { get; set; }
        public string pageid { get; set; }
        public string lang { get; set; }
        public string click { get; set; }
        public string ord { get; set; }
        public string active { get; set; }

        public Adverties AdvertiesIDataReader(IDataReader dr)
        {
            return new Adverties
            {
                 id=Convert.ToString (dr["id"]),
                 name = Convert.ToString(dr["name"]),
                 width = Convert.ToString(dr["width"]),
                 height = Convert.ToString(dr["height"]),
                 image = Convert.ToString(dr["image"]),
                 lang = Convert.ToString(dr["lang"]),
                 link = Convert.ToString(dr["link"]),
                 target = Convert.ToString(dr["target"]),
                 content = Convert.ToString(dr["content"]),
                 position = Convert.ToString(dr["position"]),
                 pageid = Convert.ToString(dr["pageid"]),
                 click = Convert.ToString(dr["click"]),
                 ord = Convert.ToString(dr["ord"]),
                 active = Convert.ToString(dr["active"]),
            };
        }
    }

}
